package com.lyn.seckill.service;

import com.lyn.seckill.common.error.BusinessException;
import com.lyn.seckill.service.model.ItemModel;

import java.util.List;

public interface ItemService {

    // 创建商品
    ItemModel createItem(ItemModel itemModel) throws BusinessException;
    // 商品列表
    List<ItemModel> listItem();
    // 商品详情
    ItemModel getItemById(Integer id);

    boolean decreaseStock(Integer itemId,Integer amount);

    void increaseSales(Integer itemId,Integer amount);
}
